View
 

Copy of rsbcv1 How to quickly build the mini-N8VEM or N8VEM SBC

Page history last edited by Maarten Kabbedijk 1 month, 2 weeks ago

Build an N8VEM Computer From Scratch

 

 

Introduction

 

Build this single board computer from commonly available components.

 

With all the parts to hand, you can have a working computer in under 40 minutes that can display “Hello World”.

 

This board was designed to solve a simple problem, namely, what is the smallest and cheapest microcontroller board that can load and run programs, store programs, communicate with other boards, and can be programmed in many different languages? It needs to be battery powered and have no moving parts. It needs access to a large library of open source code, and none of the design should be secret or proprietary.

 

Specifications:

Z80 CPU running CP/M at 8Mhz

448KB ‘disk’ based on a battery backed RAM chip

Serial ports

20x4 LCD display

Keyboard

Interface to a Propeller terminal using a standard VGA screen (in development)

Real world interface to turn on relays, sensors etc

Radio links to other boards

Programmable in machine code, BASIC, C, Fortran and many other languages

 

Optional assessories:

ECB Backplane

ECB Bus Monitor

ECB Prototyping Board

 

Step 1 – Build or buy a board

 

Schematics are here http://n8vem-sbc.pbwiki.com/  at the bottom right hand corner of the page in several folders.

 

There are two types of board – the standard N8VEM and the mini N8VEM:

 

                               Standard N8VEM       Mini N8VEM

Backplane to other boards (ECB)  Yes                  No

Files on EPROM                   50+                  2

EPROM size                       1meg                 32k

RAM disk                         448k                 448k

Real time clock                  Yes                  No

Cost of battery backed RAM       $30                  $4

Null modem cable needed          Yes                  No

On board regulator               No                   Yes

20x4 LCD header                  No                   Yes

PS/2 keyboard                    No                   No (Yes on version 2)

Digital input/output pins        24                   12

Serial ports                     1                    1 (4 on version 2)

 

Choose a board that suits your needs (or get onto the N8VEM discussion group and tell us what you would like! http://groups.google.com/group/n8vem). You can buy a board for $20, or you can make your own. The files for Eagle are included on the wiki site if you want to make your own.  All the files are included for building your own Standard N8VEM PCBs as well in the KiCAD directory.

 

http://www.instructables.com/id/Professional-PCBs-almost-cheaper-than-making-them-/  shows how to get PCBs made and if you need more than about 6 boards then it is cheaper to get them made yourself.  If you only want one board it is cheaper to buy one [ed note: is this right?].  Economical low quantity prototype PCBs are available from vendors such as AdvancedCircuits for approximately $80 for two.  Home brew PCB construction and/or ordering your own PCBs is encouraged.

 

Step 2 – Order some parts

 

Parts lists are in the respective folders in the wiki http://n8vem-sbc.pbwiki.com/  The parts list for the mini N8VEM is with the schematic or here or here.  The N8VEM has been designed to use commonly available scrap and/or surplus electronics.  Often builders can obtain most if not all of the parts necessary at local electronics surplus and/or scrap dealers at very economical rates.

 

You can put the EPROM in a standard socket or a Zero Insertion Force socket (ZIF). A standard socket is fine if you are not going to change the EPROM very often.

 

Futurlec, Digikey, Jameco and eBay are good sources. No one source is “perfect” – eg Jameco have everything but charge $30 shipping. Futurlec have almost everything but charge $4 shipping.  Shipping costs will vary depending on where you live.

 

You may also need an EPROM programmer and EPROM eraser. I got both off eBay for great prices of approximately $20 each. Search for EPROM eraser and/or EPROM Willem.  If you do get a Willem programmer, just check how it communicates.  Mine uses the parallel port and if the one you are looking at has both parallel and USB, just double check it works on USB.

 

If you are only building one or two boards it may be easier to ask for someone to program an EPROM on the N8VEM website.  Preprogrammed EPROMs are available with the standard N8VEM SBC on request.

 

You don’t need a keyboard or a LCD display to get the board working as you can run a terminal emulation program on your PC instead.

 

Step 3 – Solder up the board

 

Sockets are highly recommended, as you can swap and change parts over later on. For example, you might build it using old 74LSxxx chips from the parts drawer but change over to low power 74HCxxx or 74HCTxxx ones later. N8VEM builders are encouraged to try swapping in and out different CPUs or clock modules.  The original N8VEM design is 4 MHz but builders have reported successful SBCs running 8, 10, even 16 MHz clock speed.

 

The cheap sockets, in my opinion, are actually better than the expensive machined ones, because the cheap ones are more tolerant of a pin not being quite straight.  Some builders solder components directly to the PCB for higher reliability and/or to reduce cost, however, replacing components becomes more difficult.

 

Soldering can be greatly speeded up by putting in all the sockets at once. Then put a flat board on the top and flip the whole thing over so the sockets don’t fall out. Then solder up all the sockets, and now the board is 90% done.

 

Step 4 – Program the EPROM

 

You will need a file called ROMIMAGE.BIN

 

There are many of these in the files section, all representing various stages of development. The mini N8VEM version is not actually in the files section, but if you go to the Mini N8VEM software folder, and download everything into a folder c:\N8VEM, and then run Build-n-38.bat, it will create the ROMIMAGE.BIN file in about 1 second.

 

If you are programming a 32KB 27C256 EPROM then start the Willem programmer and select the 27C256 chip and all the settings for the DIP switches will be correct. None of the other headers needed changing from when I bought the programmer.

 

If you are programming a 1MB EPROM, have a read of the file in the EPROM programmer folder as this shows the correct settings for the headers.

 

Step 5 – Make a communications cable

 

For the Mini N8VEM, all you need is a 9 wire extension lead. You could plug the board directly into the back of the PC but it is much easier to bring the RS-232 out to the front on a long cable. IDC connectors make short work of creating an extension lead. Just remember to take the strain relief bit off before putting it in the vice! Then put the strain relief on. To make sure pin 1 goes to 1 etc, I like to plug the male and female plug together and check the colours are not crossed.

 

A USB to serial adapter will work fine too.

 

For the standard N8VEM, the header is a bit more tricky, as it is a 10 way header that goes onto a ribbon cable. It so happens though that if you have a 10 way header, then go to 10 wires, then lose one of those wires so it is wire 1-9, and then go into an IDC DE-9 then all the wires line up correctly. I went into a DE-9 male. Then you need a null modem cable. I used a DE-9 female to DE-9 female. Wires 2 and 3 are crossed over. Wire 5 straight through. And on each plug, join pins 7 and 8. And then join pins 1 to 4 to 6. So you have two plugs joined with just 3 wires.

 

Step 6 – Smoke test

 

The secret to successful "smoke test" of a N8VEM SBC is to keep the "magic smoke" inside the chips!  A few simple steps can dramatically increase your chances for a first time success.  Prior to applying power to your SBC, you should visually inspect your circuit verifying all joints are correctly soldered and there are no solder bridges.  Use a VOM to check continuity of the +5v (Vcc) and Ground (GND) supplies to the chips.  Verify that the power supply pins are correctly oriented with the SBC connector to ensure safe operation.  Use your VOM to ensure Vcc and GND are not connected.  Measure to ensure the +5v 4-pin Peripheral connector is connected to the Vcc supply correctly.  With no chips installed in the circuit, carefully apply power and measure Vcc and GND are present in each socket at the appropriate pins.  The LED should light with power applied.  Please ask for help on the forum if needed.

 

Time to put in all the chips and fire it up. Hopefully nothing will get hot! You can use a current limited power supply and set the limit at 100mA (boards usually run about 60mA with all CMOS chips).

 

Now turn it off, and get HyperTerminal (or your favorite terminal emulation program) running.

 

The latest romimages for the mini N8VEM are running at 38400 baud. You will need to check on the baud rate for the standard N8VEM which is typically 9600 baud. In any case, if you get garbage on the screen that is a good sign and usually means you just need to try baud rates till it works. You will need to set up the serial comms on the terminal program so that it is running with 38400 baud, 8 bits, no parity, 1 stop bit and flow control to none.

 

I have been using Tera Term because it is easier to save the settings (setup/save setup). HyperTerminal can save settings but you have to find where it puts the little .ht file and it is hidden deep within a sub sub folder. Other terminal programs work fine too. Most have a setting for VT100 emulation and that is worth turning on so Wordstar will work.

 

Connect everything up and turn it back on and you should get a signon message. If not, please post a help message on the forum.

 

Step 7 – Download software to the computer

 

The standard N8VEM comes with some files on the romimage, and these files can be changed by importing the romimage to the Altair SIMH simulator and using W.COM and R.COM to transfer files to and from drive F. Once the image has the right files, quit out of the Altair simulator and then download that romimage.

 

The Mini N8VEM romimage stores only two files on the EPROM. You can program this image into a huge 1MB EPROM or into a 32KB EPROM.

 

The steps in getting files onto the Mini N8VEM are:

 

Move the files manually: (you type in Bold ALL CAPS)

  1. Change to drive B with a B:

  2. Run FORMAT.COM

  3. Returns to drive A – type drive B: again

  4. Run XMODEM R PIP.COM

  5. On the terminal program (eg teraterm), File/Transfer/Xmodem/Send

  6. Go to drive A:

  7. type PIP A:XMODEM.COM=B:XMODEM.COM

 

Now run xmodem and download each program

 

OR

 

Move the files with a helper program:

  • There is now a simple one step program that does all of this automatically. This program can send all the essential files, and also all the group of files needed to run MBASIC or WordStar.  The program is written in vb.net and is in the Mini N8VEM rapid setup folder.  You can install the compiled version - just download the zip file, open it and run SETUP.EXE. Ignore the bit about it being unsigned.
  • Alternatively if you want to edit this program, get vb.net – this is available for free from Microsoft, and it contains a suite of programs that cost thousands only a few years ago. The download is quite large though. There is vb.net, c, java etc, and .net represents a convergence of all these languages. There is still some common code between vb.net and MBASIC on CP/M.

 

Conclusion

 

Once you have a working board, you may like to contribute to some of the peripherals being built – eg radio links, networking, standalone terminal boards, mass storage. Please post any comments or suggestions on the N8VEM forum.

 

James Moxham

December 28th, 2008

 

Comments (0)